package com.example.attack.service.impl;

import com.example.attack.service.EventService;
import com.example.attack.statemachine.Events;
import com.example.attack.statemachine.States;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.statemachine.StateMachine;
import org.springframework.stereotype.Service;

@Service
public class EventServiceImpl implements EventService {

    @Autowired
    private StateMachine<States, Events> stateMachine;

    @Override
    public void sendEvent(Events events) {
        boolean b = stateMachine.sendEvent(events);
        System.out.println("result: "+b);
    }
}
